﻿using PrjAssess.Models.Service.AssessProject;
using System;
using System.Collections.Generic;

using System.Linq;
using System.Web;

namespace PrjAssess.Models
{
    public class GlobalData
    {
        public static string PrjId
        {
            get
            {
                if (CurPrj == null)
                {
                    return string.Empty;
                }
                else
                {
                    return CurPrj.Id;
                }
            }
        }
        public static string PrjName
        {
            get
            {
                if (CurPrj == null)
                {
                    return "尚未选择工程";
                }
                else
                {
                    return CurPrj.Name;
                }
            }
        }
        public static PrjItem CurPrj
        {
            get
            {
                return HttpContext.Current.Session["CurPrj"] as PrjItem;
            }
            set
            {
                HttpContext.Current.Session["CurPrj"] = value;
            }
        }
    }
}